#include "Exception.hpp"


template <typename T>
std::shared_ptr<T>
ResourceManager<T>::get(const std::string& name)
{
    if (resources_.find(name) != resources_.end())
        return resources_.find(name)->second;

    throw Exception("Could not find a resource => " + name);
}

template <typename T>
inline
void
ResourceManager<T>::add(const std::string& name, T* resource)
{
    resources_[name] = std::shared_ptr<T>(resource);
}

template <typename T>
inline
void
ResourceManager<T>::remove(const std::string& name)
{
    resources_.erase(name);
}

